﻿@model IEnumerable<InfoLogic.Models.Product>

@{
    ViewBag.Title = "Products";
}


<p>
    @Html.ActionLink("Create New Product", "Create")
</p>

@foreach (var item in Model)
{
    <ul data-role="listview" data-inset="true">
        <li data-role="list-divider">@item.productName</li>

        <li>Selling Price: @Html.DisplayFor(modelItem => item.sellingPrice)
        </li>
        <li>Purchase Price: @Html.DisplayFor(modelItem => item.purchasePrice)

        </li>
        <li>
            Quantity On Hand: @Html.DisplayFor(modelItem => item.quantityOnHand)
        </li>
       
            @Html.ActionLink("Edit", "Edit", new { id = item.ProductId }) |
            @Html.ActionLink("Details", "Details", new { id = item.ProductId }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.ProductId })
        
    </ul>
}

@*<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.productName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.purchasePrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.sellingPrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.quantityOnHand)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.productName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.purchasePrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.sellingPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.quantityOnHand)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ProductId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ProductId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ProductId })
        </td>
    </tr>
}

</table>*@
